package cn.tsvtc.health.common.entity;

import java.io.Serializable;

/**
 * 封装返回结果
 * @author Athena
 * @version 1.0
 * @date 2020-11-17
 */
public class CommonResult implements Serializable {
    /**
     * 执行结果，true为执行成功 false为执行失败
     */
    private boolean flag = true;
    /**
     * 返回结果信息，主要用于页面提示信息
     */
    private String message = "";
    /**
     * 返回数据
     */
    private Object other;

    public CommonResult() {}

    public CommonResult(boolean flag, String message, Object other) {
        this.flag = flag;
        this.message = message;
        this.other = other;
    }

    public CommonResult(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getOther() {
        return other;
    }

    public void setOther(Object other) {
        this.other = other;
    }
}
